/**
 * 查询用户信息
 * @type {string} GET
 * @param {string} {openId:微信用户id }
 */
export function info(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/info", data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 修改用户信息
 * @type {string} POST
 * @param {string} {
 * id：主键id
 * weAvatar：微信头像
 * backgroundImage：背景图
 * weUserName：微信用户名
 * wePhone：微信手机号
 * age：年龄
 * education：学历
 * profession：专业
 * address：地址
 * }
 */
export function edit(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/personal/center/edit", data).then(info => {
			resolve(info)
		})
	})
}

/**
 * 我的收藏
 * @type {string} GET
 * @param {string} {openId：微信用户id}
 */
export function favorite(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/favorite", data).then(info => {
			resolve(info.result)
		})
	})

}
/**
 * 用户信息登记
 * @type {string} post
 * @param {string} {openId：微信用户id}
 */
export function register(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/personal/center/register", data).then(info => {
			resolve(info.result)
		})
	})

}
/**
 * 查询登记信息
 * @type {string} GET
 * @param {string} {openId：微信用户id}
 */
export function registerInfo(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/registerInfo", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 查询所有分院下拉框
 * @type {string} GET
 * @param {string} {openId：微信用户id}
 */
export function allStore(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/allStore", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 问题反馈
 * @type {string} post
 * @param {string} {openId：微信用户id，description：问题和意见，image：图片，phoneNumber：手机号}
 */
export function feedback(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/personal/center/feedback", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 获取数据同步验证码
 * @type {string} post	
 * @param {string} {phone ：手机号}
 */
export function sendSynchroSms(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/sendSynchroSms", data).then(info => {
			resolve(info.result)
		})
	})

}

/**
 * 同步数据
 * @type {string} post	
 * @param {string} {phone ：手机号，captcha：验证码，openId：string}
 */
export function synchroData(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/personal/center/synchroData", data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 档案记录
 * @type {string} get	
 * @param {string} {customerId:客户id}
 */
export function queryCustomerDynamic(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/queryCustomerDynamic", data).then(info => {
			resolve(info.result)
		})
	})
}


/**
 * 消费记录
 * @type {string} get	
 * @param {string} {customerId:客户id，pageNo，pageSize}
 */
export function expenseRecord(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/personal/center/expenseRecord", data).then(info => {
			resolve(info.result)
		})
	})
}


/**
 * 问题反馈（针对服务
 * @type {string} 
 * @param {string} 
 */
export function serviceFeedback(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/personal/center/serviceFeedback", data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 问卷详情
 * @type {string} 
 * @param {string} 
 */
export function questionnaireDetail(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/questionnaire/detail", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 保存问卷结果
 * @type {string} 
 * @param {string} 
 */
export function saveResult(data) {
	return new Promise(resolve => {
		uni.$u.http.post("/applet/questionnaire/saveResult", data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 健康档案
 * @type {string} 
 * @param {string} 
 */
export function healthRecord(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/alopecia/diagnostic/healthRecord", data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 主诊断列表
 * @type {string} 
 * @param {string} 
 */
export function diagnosticList(data) {
	return new Promise(resolve => {
		uni.$u.http.get("/applet/alopecia/diagnostic/list", data).then(info => {
			resolve(info.result)
		})
	})
}